//
//  UIImageView+OutWhiteFrame.m
//  puBuLiu
//
//  Created by douya on 15/1/4.
//  Copyright (c) 2015年 douya. All rights reserved.
//

#import "UIImageView+OutWhiteFrame.h"
#import <QuartzCore/QuartzCore.h>//图层 CALayer
#import <QuartzCore/CoreAnimation.h>//用来制作阴影
@implementation UIImageView (OutWhiteFrame)
-(void)AddOutFrame:(UIColor *)color Width:(int)OffSet
{
    CALayer *paddingLayer=[CALayer layer];
    
    int Wid=self.frame.size.width;
    int Hei=self.frame.size.height;
    
    paddingLayer.frame=CGRectMake(-OffSet, -OffSet, Wid+2*OffSet, Hei+2*OffSet);
    paddingLayer.borderColor=color.CGColor;
    paddingLayer.borderWidth=OffSet;
    [self.layer addSublayer:paddingLayer];
}
@end
